package com.lm.common.security.annotation;

import com.lm.common.security.component.ScmResourceServerAutoConfiguration;
import com.lm.common.security.component.ScmSecurityBeanDefinitionRegistrar;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 * 资源服务注解
 *
 * @author lm
 * @date 2019/8/21 16:58
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@EnableResourceServer
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({ScmResourceServerAutoConfiguration.class, ScmSecurityBeanDefinitionRegistrar.class})
public @interface EnableScmResourceServer {
}